<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="one">1</div>
  <button id="btn">+</button>

  <script>
    let btn = document.querySelector("#btn")
    btn.onclick = function(){

      // 获取 div 的内容
      let one = document.querySelector("#one");
      let num = one.innerHTML;
      num = parseInt(num);
      // 获取后 +1 
      num = num + 1; 

      // 将内容保存回去
      one.innerHTML = num;
    }
  </script>
  
</body>
</html>